package top.korori.entity.bo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "菜单参数")
public class SysMenuBo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("菜单id")
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Long menuId;

    @NotEmpty(message = "菜单名称不能为空")
    @ApiModelProperty("菜单名")
    private String title;

    @ApiModelProperty("菜单图标")
    private String icon;

    @NotNull(message = "父目录不能为空")
    @ApiModelProperty("父id")
    private Long pid;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("跳转路径")
    private String path;

    @ApiModelProperty("组件路径")
    private String component;

    @ApiModelProperty("路由参数")
    private String query;

    @NotNull(message = "菜单类型不能为空")
    @ApiModelProperty("菜单类型(0 目录,1 菜单, 2按钮)")
    private Integer type;

    @NotNull(message = "菜单状态不能为空")
    @ApiModelProperty("状态(0 正常 1 停用)")
    private Integer status;

    @ApiModelProperty("权限字符")
    private String perms;


}
